package com.zj.demo1.controller;

import com.zj.demo1.config.ZjBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Test1Controller {
    @Autowired
    ZjBean zjBean;

    @GetMapping("/test2")
    public String test2() {

        System.out.println(DigestUtils.md5DigestAsHex("bicc123".getBytes()));
        return "my phone is "+zjBean.getPhone()+",and now "+zjBean.getName()+" mood is "+zjBean.getMood();
    }

}
